You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > Matrix Structure > Matrix Methods > Matrix.TensorProd Method
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
Matrix.TensorProd Method

Calculates the tensor product of two vectors.

Syntax
C#
Visual Basic
public TMtx TensorProd([In] TVec Vec1, [In] TVec Vec2);

Calculates the tensor product of Vec1 and Vec2 vectors and stores the results in the calling matrix. The Rows property is set to Vec1.Length and Cols property is set to Vec2.Length. The Complex property of the calling matrix is adjusted automatically.

var Vec1,Vec2: Vector; V: Matrix; begin Vec1.Size(3); Vec1.SetIt(false,[0,2,3] Vec2.Copy(Vec1); V.TensorProd(Vec1,Vec2); // V becomes: // [0,0,0] // [0,4,6] // [0,6,9] end;
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!